package com.gzyj.jtt808.v2011.enums.addtionalinfo;

import lombok.Getter;

/**
 * JTT 808-2019 表28
 * 方向
 * @author lhj
 */
@Getter
public enum JT808_Addtional_Direction {
    进(0x00,"进"),
    出(0x01,"出"),
    ;
    private int code;
    private String name;

    JT808_Addtional_Direction(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static JT808_Addtional_Direction find(int code){
        for(JT808_Addtional_Direction direction:JT808_Addtional_Direction.values()){
            if(code==direction.getCode()){
                return direction;
            }
        }
        return null;
    }
}
